feat(rpc): add rowid-forward message pagination - #201
Conversation
|
Codex review: found issues before merge. Reviewed August 2, 2026, 1:34 PM ET / 17:34 UTC. ClawSweeper reviewWhat this changesThis PR exposes a new Merge readinessKeep open. Current Priority: P3 Review scores
Verification
How this fits togetherThe iMessage RPC server turns read requests into queries against the local Messages SQLite database and serializes Message payloads for long-running clients. The added endpoint would give downstream catch-up consumers a stable forward cursor instead of relying on newest-first history reads. flowchart LR
Client[Catch-up client] --> RPC[JSON-RPC server]
RPC --> Validation[Request validation]
Validation --> Store[Messages SQLite store]
Store --> Paging[ROWID scan and URL preview handling]
Paging --> Response[Messages plus continuation cursor]
Decision needed
Why: The implementation is additive and proof-backed, but accepting a permanent RPC method and its reaction/cursor behavior is an API-direction decision rather than a mechanical repair. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Approve the Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes an additive RPC capability rather than repairing an existing failing behavior. The contributor and collaborator nevertheless provide a high-confidence fixture-based after-fix validation path for the proposed behavior. Is this the best way to solve the issue? Unclear until an API owner accepts the stable contract. The implementation reuses current-main forward scanning rather than duplicating the database logic, but the shared reaction-event documentation must be corrected before this is the maintainable solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5bdd2b0b003a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
|
Independent verification on exact head Proof on macOS arm64:
Before landing, maintainers should align |
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Summary
messages.afterJSON-RPC pagination in stablemessage.ROWID ASCordernext_rowidand database-backedhas_moresignalCloses #200.
Downstream consumer: openclaw/openclaw#116961
Contract
since_rowidis required, non-negative, and exclusivechat_idis optional; omit it to page across all chatslimitdefaults to 100 and is capped at 500next_rowidafter every response, including empty pageshas_moreis trueinclude_reactions: trueValidation
rpcMessagesAfter|messagesAfterPagetests: 10 passedmake lint: passed; 12 existing non-serious warnings, none in changed filesmake build: universal CLI/helper build passed; existingunarchiveObjectWithData:deprecation warning onlygit diff --check: passedA full local
make testattempt remains blocked by a pre-existingStdoutCapturepipe deadlock in output-heavy tests such asstatusCommandProducesTextOutputandchatBackgroundStatusEmitsReadOnlyJSON. Those 139 capture-based tests were excluded from the broad local run; focused changed-surface tests pass.